﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SGRapidForm.Permission.Service.Interface;
using SGRapidForm.Common;
using DevExpress.Web.ASPxMenu;
using System.Xml;
using DevExpress.Web.ASPxTreeList;
using SGRapidForm.Permission.Entity;

namespace SGDemo.Permission
{
    
    public partial class HelpCategoryList : System.Web.UI.Page
    {
        private IPermissionService _permissionService = ServiceProxyFactory.Create<IPermissionService>("permissionservice");
        protected void Page_Load(object sender, EventArgs e)
        {
             JSManager.RegAjax(Header, this.GetType().BaseType);
        }
        /// <summary>
        /// TreeList重新绑定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void tlList_CustomCallback(object sender, TreeListCustomCallbackEventArgs e)
        {
            tlList.DataBind();
            tlList.ExpandToLevel(2);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="keyid">用户Keyid</param>
        /// <returns></returns>
        [AjaxPro.AjaxMethod]
        public bool Delete(string keyid)
        {
            return _permissionService.HelpCategory_Delete(keyid);
        }
    }
    public class HelpCategoryListDateSource
    {

        private IPermissionService _permissionService = ServiceProxyFactory.Create<IPermissionService>("permissionservice");
        public List<HelpCategory> FilteredGetAll(string filterConditions)
        {

            return _permissionService.HelpCategory_GetCategoryAll();
        }
    }
}